load("//bazel:macros.bzl", "generated_cc_atom")

cc_library(
    name = "core_srcs",
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkAnimCodecPlayer_src",
        ":SkBase64_src",
        ":SkCamera_src",
        ":SkCanvasStack_src",
        ":SkCanvasStateUtils_src",
        ":SkCharToGlyphCache_src",
        ":SkClipStackUtils_src",
        ":SkCustomTypeface_src",
        ":SkDashPath_src",
        ":SkEventTracer_src",
        ":SkFloatToDecimal_src",
        ":SkMatrix22_src",
        ":SkMultiPictureDocument_src",
        ":SkNWayCanvas_src",
        ":SkNullCanvas_src",
        ":SkOSPath_src",
        ":SkOrderedFontMgr_src",
        ":SkPaintFilterCanvas_src",
        ":SkParseColor_src",
        ":SkParsePath_src",
        ":SkParse_src",
        ":SkPatchUtils_src",
        ":SkPolyUtils_src",
        ":SkShaderUtils_src",
        ":SkShadowTessellator_src",
        ":SkShadowUtils_src",
        ":SkTextUtils_src",
        ":SkUTF_src",
        ":SkVMVisualizer_src",
    ],
)

cc_library(
    name = "json_srcs",
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkJSONWriter_src",
        ":SkJSON_src",
        ":SkShaperJSONWriter_src",
    ],
)

# TODO(kjlubick) add selects here to allow opting in or out of things like JSON
cc_library(
    name = "srcs",
    visibility = ["//:__subpackages__"],
    deps = [
        ":core_srcs",
    ],
)

generated_cc_atom(
    name = "SkAnimCodecPlayer_src",
    srcs = ["SkAnimCodecPlayer.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/codec:SkCodec_hdr",
        "//include/core:SkCanvas_hdr",
        "//include/core:SkData_hdr",
        "//include/core:SkImage_hdr",
        "//include/utils:SkAnimCodecPlayer_hdr",
        "//src/codec:SkCodecImageGenerator_hdr",
        "//src/core:SkPixmapPriv_hdr",
    ],
)

generated_cc_atom(
    name = "SkBase64_src",
    srcs = ["SkBase64.cpp"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/utils:SkBase64_hdr"],
)

generated_cc_atom(
    name = "SkBitSet_hdr",
    hdrs = ["SkBitSet.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/private:SkMalloc_hdr",
        "//include/private:SkTOptional_hdr",
        "//include/private:SkTemplates_hdr",
        "//src/core:SkMathPriv_hdr",
    ],
)

generated_cc_atom(
    name = "SkCallableTraits_hdr",
    hdrs = ["SkCallableTraits.h"],
    visibility = ["//:__subpackages__"],
)

generated_cc_atom(
    name = "SkCamera_src",
    srcs = ["SkCamera.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkCanvas_hdr",
        "//include/utils:SkCamera_hdr",
    ],
)

generated_cc_atom(
    name = "SkCanvasStack_hdr",
    hdrs = ["SkCanvasStack.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkRegion_hdr",
        "//include/private:SkTArray_hdr",
        "//include/utils:SkNWayCanvas_hdr",
    ],
)

generated_cc_atom(
    name = "SkCanvasStack_src",
    srcs = ["SkCanvasStack.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkCanvasStack_hdr",
        "//include/core:SkShader_hdr",
    ],
)

generated_cc_atom(
    name = "SkCanvasStateUtils_src",
    srcs = ["SkCanvasStateUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkCanvasStack_hdr",
        "//include/core:SkBitmap_hdr",
        "//include/core:SkCanvas_hdr",
        "//include/utils:SkCanvasStateUtils_hdr",
        "//src/core:SkDevice_hdr",
        "//src/core:SkRasterClip_hdr",
        "//src/core:SkWriter32_hdr",
    ],
)

generated_cc_atom(
    name = "SkCharToGlyphCache_hdr",
    hdrs = ["SkCharToGlyphCache.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkTypes_hdr",
        "//include/private:SkTDArray_hdr",
    ],
)

generated_cc_atom(
    name = "SkCharToGlyphCache_src",
    srcs = ["SkCharToGlyphCache.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkCharToGlyphCache_hdr",
        "//include/private:SkTFitsIn_hdr",
    ],
)

generated_cc_atom(
    name = "SkClipStackUtils_hdr",
    hdrs = ["SkClipStackUtils.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkTypes_hdr"],
)

generated_cc_atom(
    name = "SkClipStackUtils_src",
    srcs = ["SkClipStackUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/pathops:SkPathOps_hdr",
        "//src/core:SkClipStack_hdr",
    ],
)

generated_cc_atom(
    name = "SkCustomTypeface_src",
    srcs = ["SkCustomTypeface.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkCanvas_hdr",
        "//include/core:SkData_hdr",
        "//include/core:SkFontMetrics_hdr",
        "//include/private:SkFloatingPoint_hdr",
        "//include/utils:SkCustomTypeface_hdr",
        "//src/core:SkAdvancedTypefaceMetrics_hdr",
        "//src/core:SkAutoMalloc_hdr",
        "//src/core:SkPathPriv_hdr",
        "//src/core:SkScalerContext_hdr",
    ],
)

generated_cc_atom(
    name = "SkDashPathPriv_hdr",
    hdrs = ["SkDashPathPriv.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkPathEffect_hdr"],
)

generated_cc_atom(
    name = "SkDashPath_src",
    srcs = ["SkDashPath.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkDashPathPriv_hdr",
        "//include/core:SkPathMeasure_hdr",
        "//include/core:SkStrokeRec_hdr",
        "//src/core:SkPathPriv_hdr",
        "//src/core:SkPointPriv_hdr",
    ],
)

generated_cc_atom(
    name = "SkEventTracer_src",
    srcs = ["SkEventTracer.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/private:SkOnce_hdr",
        "//include/utils:SkEventTracer_hdr",
    ],
)

generated_cc_atom(
    name = "SkFloatToDecimal_hdr",
    hdrs = ["SkFloatToDecimal.h"],
    visibility = ["//:__subpackages__"],
)

generated_cc_atom(
    name = "SkFloatToDecimal_src",
    srcs = ["SkFloatToDecimal.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkFloatToDecimal_hdr",
        "//include/core:SkTypes_hdr",
    ],
)

generated_cc_atom(
    name = "SkFloatUtils_hdr",
    hdrs = ["SkFloatUtils.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkTypes_hdr"],
)

generated_cc_atom(
    name = "SkJSONWriter_hdr",
    hdrs = ["SkJSONWriter.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkStream_hdr",
        "//include/private:SkNoncopyable_hdr",
        "//include/private:SkTArray_hdr",
    ],
)

generated_cc_atom(
    name = "SkJSONWriter_src",
    srcs = ["SkJSONWriter.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [":SkJSONWriter_hdr"],
)

generated_cc_atom(
    name = "SkJSON_hdr",
    hdrs = ["SkJSON.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkTypes_hdr",
        "//include/private:SkNoncopyable_hdr",
        "//include/private:SkTo_hdr",
        "//src/core:SkArenaAlloc_hdr",
    ],
)

generated_cc_atom(
    name = "SkJSON_src",
    srcs = ["SkJSON.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkJSON_hdr",
        ":SkUTF_hdr",
        "//include/core:SkStream_hdr",
        "//include/core:SkString_hdr",
        "//include/private:SkMalloc_hdr",
        "//include/utils:SkParse_hdr",
    ],
)

generated_cc_atom(
    name = "SkMatrix22_hdr",
    hdrs = ["SkMatrix22.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkPoint_hdr"],
)

generated_cc_atom(
    name = "SkMatrix22_src",
    srcs = ["SkMatrix22.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkMatrix22_hdr",
        "//include/core:SkMatrix_hdr",
        "//include/core:SkPoint_hdr",
        "//include/core:SkScalar_hdr",
    ],
)

generated_cc_atom(
    name = "SkMultiPictureDocumentPriv_hdr",
    hdrs = ["SkMultiPictureDocumentPriv.h"],
    visibility = ["//:__subpackages__"],
    deps = [":SkMultiPictureDocument_hdr"],
)

generated_cc_atom(
    name = "SkMultiPictureDocument_hdr",
    hdrs = ["SkMultiPictureDocument.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkDocument_hdr",
        "//include/core:SkPicture_hdr",
        "//include/core:SkSize_hdr",
    ],
)

generated_cc_atom(
    name = "SkMultiPictureDocument_src",
    srcs = ["SkMultiPictureDocument.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkMultiPictureDocumentPriv_hdr",
        ":SkMultiPictureDocument_hdr",
        "//include/core:SkPictureRecorder_hdr",
        "//include/core:SkPicture_hdr",
        "//include/core:SkSerialProcs_hdr",
        "//include/core:SkStream_hdr",
        "//include/private:SkTArray_hdr",
        "//include/private:SkTo_hdr",
        "//include/utils:SkNWayCanvas_hdr",
    ],
)

generated_cc_atom(
    name = "SkNWayCanvas_src",
    srcs = ["SkNWayCanvas.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkShader_hdr",
        "//include/utils:SkNWayCanvas_hdr",
        "//src/core:SkCanvasPriv_hdr",
    ],
)

generated_cc_atom(
    name = "SkNullCanvas_src",
    srcs = ["SkNullCanvas.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkCanvas_hdr",
        "//include/utils:SkNWayCanvas_hdr",
        "//include/utils:SkNullCanvas_hdr",
    ],
)

generated_cc_atom(
    name = "SkOSPath_hdr",
    hdrs = ["SkOSPath.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkString_hdr"],
)

generated_cc_atom(
    name = "SkOSPath_src",
    srcs = ["SkOSPath.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [":SkOSPath_hdr"],
)

generated_cc_atom(
    name = "SkOrderedFontMgr_src",
    srcs = ["SkOrderedFontMgr.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/utils:SkOrderedFontMgr_hdr",
        "//src/core:SkFontDescriptor_hdr",
    ],
)

generated_cc_atom(
    name = "SkPaintFilterCanvas_src",
    srcs = ["SkPaintFilterCanvas.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkPaint_hdr",
        "//include/core:SkPixmap_hdr",
        "//include/core:SkSurface_hdr",
        "//include/utils:SkPaintFilterCanvas_hdr",
        "//src/core:SkCanvasPriv_hdr",
        "//src/core:SkTLazy_hdr",
    ],
)

generated_cc_atom(
    name = "SkParseColor_src",
    srcs = ["SkParseColor.cpp"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/utils:SkParse_hdr"],
)

generated_cc_atom(
    name = "SkParsePath_src",
    srcs = ["SkParsePath.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkStream_hdr",
        "//include/core:SkString_hdr",
        "//include/utils:SkParsePath_hdr",
        "//include/utils:SkParse_hdr",
        "//src/core:SkGeometry_hdr",
    ],
)

generated_cc_atom(
    name = "SkParse_src",
    srcs = ["SkParse.cpp"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/utils:SkParse_hdr"],
)

generated_cc_atom(
    name = "SkPatchUtils_hdr",
    hdrs = ["SkPatchUtils.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkMatrix_hdr",
        "//include/private:SkColorData_hdr",
    ],
)

generated_cc_atom(
    name = "SkPatchUtils_src",
    srcs = ["SkPatchUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkPatchUtils_hdr",
        "//include/core:SkVertices_hdr",
        "//include/private:SkColorData_hdr",
        "//include/private:SkTPin_hdr",
        "//include/private:SkTo_hdr",
        "//src/core:SkArenaAlloc_hdr",
        "//src/core:SkColorSpacePriv_hdr",
        "//src/core:SkConvertPixels_hdr",
        "//src/core:SkGeometry_hdr",
    ],
)

generated_cc_atom(
    name = "SkPolyUtils_hdr",
    hdrs = ["SkPolyUtils.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkPoint_hdr",
        "//include/private:SkTDArray_hdr",
    ],
)

generated_cc_atom(
    name = "SkPolyUtils_src",
    srcs = ["SkPolyUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkPolyUtils_hdr",
        "//include/private:SkNx_hdr",
        "//include/private:SkTArray_hdr",
        "//include/private:SkTemplates_hdr",
        "//src/core:SkPointPriv_hdr",
        "//src/core:SkTDPQueue_hdr",
        "//src/core:SkTInternalLList_hdr",
    ],
)

generated_cc_atom(
    name = "SkShadowTessellator_hdr",
    hdrs = ["SkShadowTessellator.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkColor_hdr",
        "//include/core:SkPoint_hdr",
        "//include/core:SkRefCnt_hdr",
    ],
)

generated_cc_atom(
    name = "SkShadowTessellator_src",
    srcs = ["SkShadowTessellator.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkPolyUtils_hdr",
        ":SkShadowTessellator_hdr",
        "//include/core:SkPath_hdr",
        "//include/core:SkPoint3_hdr",
        "//include/core:SkVertices_hdr",
        "//include/private:SkColorData_hdr",
        "//include/private:SkTPin_hdr",
        "//src/core:SkDrawShadowInfo_hdr",
        "//src/core:SkGeometry_hdr",
        "//src/core:SkPointPriv_hdr",
        "//src/gpu/geometry:GrPathUtils_hdr",
    ],
)

generated_cc_atom(
    name = "SkShadowUtils_src",
    srcs = ["SkShadowUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkShadowTessellator_hdr",
        "//include/core:SkCanvas_hdr",
        "//include/core:SkColorFilter_hdr",
        "//include/core:SkMaskFilter_hdr",
        "//include/core:SkPath_hdr",
        "//include/core:SkString_hdr",
        "//include/core:SkVertices_hdr",
        "//include/private:SkColorData_hdr",
        "//include/private:SkIDChangeListener_hdr",
        "//include/private:SkTPin_hdr",
        "//include/utils:SkRandom_hdr",
        "//include/utils:SkShadowUtils_hdr",
        "//src/core:SkBlurMask_hdr",
        "//src/core:SkColorFilterBase_hdr",
        "//src/core:SkColorFilterPriv_hdr",
        "//src/core:SkDevice_hdr",
        "//src/core:SkDrawShadowInfo_hdr",
        "//src/core:SkEffectPriv_hdr",
        "//src/core:SkPathPriv_hdr",
        "//src/core:SkRasterPipeline_hdr",
        "//src/core:SkResourceCache_hdr",
        "//src/core:SkRuntimeEffectPriv_hdr",
        "//src/core:SkTLazy_hdr",
        "//src/core:SkVM_hdr",
        "//src/core:SkVerticesPriv_hdr",
        "//src/gpu/effects:GrSkSLFP_hdr",
        "//src/gpu/geometry:GrStyledShape_hdr",
    ],
)

generated_cc_atom(
    name = "SkShaperJSONWriter_hdr",
    hdrs = ["SkShaperJSONWriter.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkSpan_hdr",
        "//modules/skshaper/include:SkShaper_hdr",
    ],
)

generated_cc_atom(
    name = "SkShaperJSONWriter_src",
    srcs = ["SkShaperJSONWriter.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkJSONWriter_hdr",
        ":SkShaperJSONWriter_hdr",
        ":SkUTF_hdr",
    ],
)

generated_cc_atom(
    name = "SkTextUtils_src",
    srcs = ["SkTextUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkPath_hdr",
        "//include/core:SkTextBlob_hdr",
        "//include/utils:SkTextUtils_hdr",
        "//src/core:SkFontPriv_hdr",
    ],
)

generated_cc_atom(
    name = "SkThreadUtils_pthread_src",
    srcs = ["SkThreadUtils_pthread.cpp"],
    visibility = ["//:__subpackages__"],
)

generated_cc_atom(
    name = "SkThreadUtils_win_src",
    srcs = ["SkThreadUtils_win.cpp"],
    visibility = ["//:__subpackages__"],
)

generated_cc_atom(
    name = "SkUTF_hdr",
    hdrs = ["SkUTF.h"],
    visibility = ["//:__subpackages__"],
    deps = ["//include/core:SkTypes_hdr"],
)

generated_cc_atom(
    name = "SkUTF_src",
    srcs = ["SkUTF.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkUTF_hdr",
        "//include/private:SkTFitsIn_hdr",
    ],
)

generated_cc_atom(
    name = "SkShaderUtils_hdr",
    hdrs = ["SkShaderUtils.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/private:SkSLProgramKind_hdr",
        "//include/private:SkSLString_hdr",
    ],
)

generated_cc_atom(
    name = "SkShaderUtils_src",
    srcs = ["SkShaderUtils.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkShaderUtils_hdr",
        "//include/core:SkString_hdr",
        "//include/private:SkSLString_hdr",
    ],
)

generated_cc_atom(
    name = "SkVMVisualizer_hdr",
    hdrs = ["SkVMVisualizer.h"],
    visibility = ["//:__subpackages__"],
    deps = [
        "//include/core:SkSpan_hdr",
        "//include/core:SkStream_hdr",
        "//include/core:SkString_hdr",
        "//include/private:SkBitmaskEnum_hdr",
        "//include/private:SkChecksum_hdr",
        "//include/private:SkTHash_hdr",
        "//src/core:SkOpts_hdr",
        "//src/sksl:SkSLOutputStream_hdr",
        "//src/sksl/tracing:SkVMDebugTrace_hdr",
    ],
)

generated_cc_atom(
    name = "SkVMVisualizer_src",
    srcs = ["SkVMVisualizer.cpp"],
    visibility = ["//:__subpackages__"],
    deps = [
        ":SkVMVisualizer_hdr",
        "//src/core:SkStreamPriv_hdr",
    ],
)
